package com.aaa.controller.tables;

import com.aaa.dao.AuditMapper;
import com.wsc.entity.Audit;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("audit")
public class AuditController {
    @Resource
    AuditMapper auditMapper;
    @RequestMapping("select")
    public Object select(){
        return   auditMapper.selectList(null);
    }
    @RequestMapping("insert")
    public Integer insert(Audit apply){
        return auditMapper.insert(apply);
    }
    @RequestMapping("delete")
    public Integer delete(Integer id){
        return auditMapper.deleteById(id);
    }
    @RequestMapping("update")
    public Integer update(Audit aaplyDate){
        return auditMapper.updateById(aaplyDate);
    }

}
